home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lantools
/
lanscrpt
/
system.bat
< prev
Wrap
DOS Batch File
|
1992-08-18
|
2KB
|
60 lines
@echo off
rem Another enviroment variable to find the machine name that the user is
rem logging in from. I use the /noerror so that the machine won't start
rem beeping if something goes wrong.
set mach_name=xxxxxxx
net/noerror string mach_name !"machineid"
net/noerror use y: \\server1\lanutil
net/noerror message/disable beep
net/noerror clock \\server1
net/noerror lpt timeout 10
net/noerror lpt notify /enable
net/noerror stream/enable \\server1 0 @deskjet
net/noerror stream/enable \\server1 1 @draft
net/noerror stream/enable \\server1 2 @envelop
net/noerror stream/enable \\server1 3 @???????.???
rem Now we bring it all together. Below, you use the %name% variable to run a
rem specific batch file that matches the users name.
if %mach_name%==server1 goto server
if %mach_name%==front1 goto work1
if %mach_name%==8088 goto work2
:server
if %name%==ken .and. %mach_name%==server1 call z:\%name%
if %name%==betty .and. %mach_name%==server1 call z:\%name%
if %name%==vikki .and. %mach_name%==server1 call z:\%name%
if not %name%==ken .or. %name%==vikki .or. %name%==betty .and. %mach_name%==server1 goto 2nd
goto end
:work1
if %name%==ken .and. %mach_name%==front1 call z:\%name%
if %name%==betty .and. %mach_name%==front1 call z:\%name%
if %name%==vikki .and. %mach_name%==front1 call z:\%name%
goto 1st
:work2
if %name%==ken .and. %mach_name%==8088 call z:\%name%
if %name%==betty .and. %mach_name%==8088 call z:\%name%
if %name%==vikki .and. %mach_name%==8088 call z:\%name%
if not %name%==ken .or. %name%==betty .or. %name%==vikki .and. %mach_name%==8088 goto 2nd
:1st
m:
call m:\qnet %name%
goto end
:2nd
call z:\%name%
i:
call i:\menu
goto end
:other
goto end
:end
cls
set path=c:\dos;c:\4dos;c:\lantasti;c:\utility
quit